#!/usr/bin/env python3

TOTAL = 200

coins = [1,2,5,10,20,50,100,200,500]

'''BAD METHOD, VERY SLOW
ways = set()

def makechange(left,cur=None):
    if cur is None:
        current = []
    else:
       current = cur*1
    for coin in coins:
        if coin <= left:
#            print(str(left)+" left, coin: "+str(coin))
#            print(current)
            c = current*1
            c.append(coin)
            makechange(left-coin,c)
    if left == 0:
        cur.sort()
        ways.add(tuple(cur))
#        print("O left")
        return
            
makechange(TOTAL)

print(len(ways))

print(ways)'''

ways = [0]*(TOTAL+1)
ways[0] = 1
for coin in coins:
    for x in range(coin,TOTAL+1):
#        print(str(x)+","+str(x-coin))
        ways[x] += ways[x-coin]
        
print(ways)